package checker;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;

public class ArrayChecker extends Checker{
	private ArrayList<String[]> original_array;
	private ArrayList<String[]> compared_array;
	private int copy_count;
	public ArrayChecker()
	{
		this.original_array = null;
		this.compared_array = null;
		this.copy_count = 0;
	}
	public final void set_origin_arraylist(ArrayList<String[]> origin_array)
	{
		this.original_array = origin_array;
	}
	public final void set_compared_arraylist(ArrayList<String[]> compared_array)
	{
		this.compared_array = compared_array;
	}
	public void compare()
	{
		int origin_count = original_array.size();
		int compared_count = compared_array.size();
			for(int i =0; i < origin_count ; i ++)
			{
				String[] array1 = original_array.get(i);
				for(int j = 0; j < compared_count ; j ++)
				{
					String[] array2 = compared_array.get(j);
					if(Arrays.deepEquals(array1, array2))
					{
						this.copy_count++;

			
					}
				}
			}

		
		
	}
	protected ArrayList<String[]> get_origin_array()
	{
		return this.original_array;
	}
	protected ArrayList<String[]> get_compared_array()
	{
		return this.compared_array;
	}
	public int getCount()
	{
		return this.copy_count;
	}
}
